/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-07-22
 * Time: 15:14
 * To BE A Better Person-2020-3-2
 */

public class TestDemo2 {
    public static void main(String[] args) {
        Thread t=new Thread(()->{
            while(true){
                System.out.println("i'm Thread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        t.start();
        while (true){
            System.out.println("i'm main!");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
